Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/helpers

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/helpers

turf helpers module

  • 5.1.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @turf/helpers?

The @turf/helpers package is part of the Turf.js library, which is a modular geospatial engine written in JavaScript. It provides functions to create various simple geometrical features such as points, lines, and polygons, and to manipulate these geometries in various ways. This package is particularly useful for developers working with geographic information systems (GIS) and spatial analysis in web applications.

What are @turf/helpers's main functionalities?

Creating Points

This function creates a GeoJSON Point feature using the provided coordinates. It is useful for representing locations on a map.

const point = turf.point([5, 10]);

Creating LineStrings

This function creates a GeoJSON LineString feature from an array of positions. It is useful for mapping routes or paths.

const line = turf.lineString([[5, 10], [20, 40]]);

Creating Polygons

This function creates a GeoJSON Polygon feature from an array of linear rings. It is used to represent areas such as city boundaries or lakes.

const polygon = turf.polygon([[[5, 10], [20, 40], [40, 0], [5, 10]]]);

Other packages similar to @turf/helpers

Keywords

FAQs

Package last updated on 10 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc